package com.hlcity.service.impl;

import org.springframework.transaction.annotation.Transactional;

import com.hlcity.domain.User;
import com.hlcity.mapper.UserMapper;
import com.hlcity.service.UserService;

@Transactional
public class UserServiceImpl implements UserService{
	
	private UserMapper userMapper;
	
	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	public Integer getCount(){
		return userMapper.getUserCount();
	}

	public User getByName(String name) {
		return userMapper.getUserByName(name);
	}/**/
	

	public void add(User user) {
		userMapper.insertUser(user);
	}
	
	public void update(User user) {
		userMapper.updateUser(user);
	}
	
	public void delete(Integer id) {
		userMapper.deleteUser(id);
	}

	
}
